package com.zzh.camera2.presenter

import android.content.Context
import android.graphics.Bitmap
import com.zzh.camera2.manager.IBaseCameraManager
import com.zzh.camera2.ui.AutoFitTextureView

interface MainContract {
    interface Presenter : IBaseCameraManager {
        fun takePhoto()

        // for second camera
        fun takePhoto2()
        fun openCamera2(
            textureView: AutoFitTextureView, cameraId: Int, previewWidth: Int,
            previewHeight: Int, previewFormat: Int
        )

        fun startPreview2()
        fun stopPreview2()
        fun releaseCamera2()
    }

    interface View {
        fun setCameraApiVersion(apiVersion: String)
        fun onPreviewCallback(bitmap: Bitmap?)
        fun onPreviewCallback2(bitmap: Bitmap?)
        fun getAcContext(): Context
        fun showToast(content: String)
    }
}